package thread;

public class InterruptedThread extends Thread {
	@Override
	public void run() {
		while (!Thread.currentThread().isInterrupted()) {
			try {
				sleep(1000);
			} catch (InterruptedException e) {
				System.out.println("catch处理前:" + currentThread().isInterrupted());
				currentThread().interrupt();
				e.printStackTrace();
				System.out.println("catch处理后:" + currentThread().isInterrupted());
			}
		}
	}

}
